package com.example.qxfw.qxxx.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.qxfw.common.entity.zy.ReservoirWaterInfo;
import com.example.qxfw.qxxx.mapper.ReservoirWaterInfoMapper;
import com.example.qxfw.qxxx.service.ReservoirWaterInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class ReservoirWaterInfoServiceImpl implements ReservoirWaterInfoService {

    @Autowired
    private ReservoirWaterInfoMapper reservoirWaterInfoMapper;

    @Override
    public List<ReservoirWaterInfo> listByParams(String observTime, String city) {
        return reservoirWaterInfoMapper.selectList(Wrappers.<ReservoirWaterInfo>lambdaQuery()
                .eq(ReservoirWaterInfo::getObservtime, Timestamp.valueOf(observTime))
                .like(ReservoirWaterInfo::getCity,city));
    }
}
